package com.chinaunicom.annotation;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

/**
 * @author liry
 * @version 1.0
 * @date Created on 2022/1/10 11:03
 * Description:
 */

@Component
@ComponentScan("com.chinaunicom.annotation")
public class AnnotationTest {

	public static void main(String[] args) {
		ApplicationContext applicationContext = new AnnotationConfigApplicationContext(AnnotationTest.class);

		UserService userService = (UserService) applicationContext.getBean("userService");

		userService.say();
	}
}
